cmake_minimum_required(VERSION 3.13)
project(redis_net CXX C)

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_C_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED True)

set(SRC src)

include_directories(${SRC})

set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR})

# 设置编译选项
add_compile_options(-ggdb -Wall)

# 定义通用静态库
set(LIB_COMM pthread z dl rt)

file(GLOB_RECURSE SRC_LIST ${SRC}/*.c*)
add_executable(server ${SRC_LIST} ${SRC}/server.c)
target_link_libraries(server ${LIB_COMM})